﻿@model AuthPermissions.AspNetCore.ShardingServices.ShardingOnlyTenantAddDto

@{
    ViewData["Title"] = "Create";
}

<h1>Create Tenant</h1>
<h4><i>NOTE: This can take some time to create a tenant, and it's tenant data.</i></h4>

<hr />
<div class="row">
    <div class="col-md-8">
        <form asp-action="Create">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            @Html.HiddenFor(x => x.DbProviderShortName)
            <div class="form-group">
                <label asp-for="TenantName" class="control-label"></label>
                <input asp-for="TenantName" class="form-control" />
                <span asp-validation-for="TenantName" class="text-danger"></span>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 col-form-label" class="control-label">Servers</label>
                <div class="col-sm-8">
                    @Html.DropDownListFor(m => m.ConnectionStringName,
                        new SelectList(Model.ConnectionStringNames))
                </div>
            </div>
            <div class="form-group">
                <input type="submit" value="Create" class="btn btn-primary" />
            </div>
        </form>
    </div>
</div>

<div>
    <a asp-action="Index">Back to List</a>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
